package cn.rcth.base.mapper;

import cn.rcth.base.domain.UserAddress;
import java.util.List;

public interface UserAddressMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserAddress record);

    UserAddress selectByPrimaryKey(Long id);

    List<UserAddress> selectAll();

    int updateByPrimaryKey(UserAddress record);

    UserAddress selectuserAddressById(Long userAddressId);

    /**
     * 查询默认地址
     * @param userId
     * @return
     */
    UserAddress selectDefaultUserAddress(Long userId);

    /**
     * 查询当前用户所有的地址
     * @param id
     * @return
     */
    List<UserAddress> selectUser(Long id);

    /**
     * 查询当前用户地址的条数
     * @param userId
     * @return
     */
    int selectUserAddressNum(Long  userId);
}